package main

import (
	"Ginproject/GinProject/Template_function/function/src"
	"github.com/gin-gonic/gin"
	"html/template"
)

func main() {
	router := gin.Default()

	router.SetFuncMap(template.FuncMap{
		"add":       src.AddNum,
		"slice_str": src.StrSlice,
		"temp":      src.Template_str,
	})

	router.LoadHTMLGlob("template/**/*")
	router.Static("/static", "/static")
	router.GET("/functpl", src.FuncTpl)
	router.GET("/funcself", src.SelfDefine)

	router.Run(":8080")
}
